
<div ng-controller="CostCtrl">
	
<div ng-include="'/templates/paramsSelect.html'"></div>
	<div class="page-heading">
		<ul class="breadcrumb">
			<li><a href="javascript:">报表管理</a></li>
			<li><a href="javascript:">维修报表</a></li>
			<li class="active" ng-hide="menuName">维修业务成本查询</li>
			<li class="active" ng-show="menuName" ng-bind="menuName"></li>
			<span style="margin-right:10px;"  class="btn btn-danger btn-xs pull-right btn-flag " ng-show="flag" ng-click="delFlag('/cost/cost/')"><i class="fa fa-times"></i> 删除 </span>
			<span style="margin-right:10px;"  class="btn btn-info btn-xs pull-right btn-flag " ng-click="addFlag('#/repair/cost/')"><i class="fa fa-star"></i> 收藏 </span>
		
		</ul>
	</div>
	<!-- 页面头部  end-->

	<!--页面内容显示区域-->
	<div class="wrapper">


		<div class="row">
			<div class="col-sm-12">
				<!--表格显示区域-->
				<section class="panel">
					<!--区块头 显示表格名称和功能按钮-->
					<header class="panel-heading">
						维修业务成本查询条件
						<!--控制按钮-->
						<span class="tools pull-right"> <!--收起-->
							<button type="button" class="btn btn-success pull-left" ng-click="SearchData()" 
							style="margin-left: 5px;">
								<i class="fa fa-search"></i> 查询
							</button>
							<button type="button" class="btn btn-info  pull-left" ng-click="ExportData()" 
							style="margin-left: 5px;">
								<i class="fa fa-table"></i> 导出EXCEL
							</button> <a href="javascript:" class="fa fa-chevron-up form_display"></a>

						</span>
					</header>
					<!--区块body 显示表格内容-->
					<div class="panel-body form-horizontal form_hide">
						<div class="row">
                        	 
                        	<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">事业部</label>
										<div class="col-lg-8 col-sm-7">
										<input type="text" id="group_name" ng-keyup="clearGroup()" name="group_name"   class="form-control select_edit form_params" />
                                            <ul class="select_list">
                                                  <li ng-repeat="e in groups" ng-click='LoadBrands(e.group_name)' val_code="{{e.group_name}}" val_name="{{e.group_name}}">{{e.group_name}}</li>
                                            </ul>  
                                            </div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">店面品牌</label>
									<div class="col-lg-8 col-sm-7">
										<input type="text" id="entity_brand_name"   ng-keyup="clearGroupBrand()" name="entity_brand_name" class="form-control select_edit form_params" value=""/>
                                            <ul class="select_list">
                                                  <li ng-repeat="e in gBrands" ng-click='LoadEntitys(e)' val_code="{{e.brand_code}}" val_name="{{e.brand_name}}">{{e.brand_name}}</li>
                                            </ul> 
									</div>
								</div>
							</div>
							
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label" for="inputEmail1">店面信息</label>
									<div class="col-lg-8 col-sm-7">
											<input type="text" id="entity_name"  ng-keyup="clearGroupBrandEntity()" name="entity_name" class="form-control select_edit form_params" value=""/>
                                            <ul class="select_list">
                                                  <li ng-repeat="e in entitys"  ng-click='LoadEntityBrands(e)' val_code="{{e.entity_code}}" val_name="{{e.entity_name}}">{{e.entity_name}}({{e.entity_code}})</li>
                                            </ul>  
									</div>
								</div>
							</div>
							
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">维修类型</label>
									<div class="col-lg-8 col-sm-7">
									     <select name="repair_type_code" id="repair_type_code" multiple="multiple" class="form-control form_params">
										 </select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">是否结清</label>
									<div class="col-lg-8 col-sm-7">
										<select name="pay_off"  class="form-control form_params">
											<option></option>
											<option ng-repeat="b in is_square" value="{{b.status_code}}">{{b.status_desc}}</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">日期</label>
									<div class="col-lg-8 col-sm-7">
										<select name="search_date"  class="form-control form_params">
											<option value="ro_create_date">工单开单日期</option>
											<option value="complete_time">竣工时间</option>
											<option value="for_balance_time">提交结算时间</option>
											<option value="balance_time">结算时间</option>
											<option value="square_date">结清日期</option>
											<option value="end_time_supposed">预交车时间</option>
											<option value="balance_close_time">关单日期</option>
											<option value="wrt_begin_date">保修日期</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1"></label>
									<div class="col-lg-8 col-sm-7">
										<div data-date-format="yyyy-mm-dd" data-date="2016-5-15" class="input-large custom-date-range ">
											<input type="text" name="start_date"  class="form-control form_params" id="start_date" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'end_date\')||\'2020-10-01\'}'})">
										</div>
									</div>
								</div>
							</div>
                            
                            <div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label text-center" for="inputEmail1">至</label>
									<div class="col-lg-8 col-sm-7">
										<div data-date-format="yyyy-mm-dd" data-date="2016-5-15" class="input-large custom-date-range">
											 <input type="text" name="end_date"   class="form-control form_params" id="end_date" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'start_date\')}',maxDate:'2020-10-01'})">
										</div>
									</div>
								</div>
							</div>
							
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">工单号</label>
									<div class="col-lg-8 col-sm-7">
										<input name="ro_no" type="text" class="form-control form_params">
									</div>
								</div>
							</div>
							
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">车牌号</label>
									<div class="col-lg-8 col-sm-7">
										<input name="license" class="form-control form_params">
									</div>
								</div>
							</div>
							
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">发动机号</label>
									<div class="col-lg-8 col-sm-7">
										<input name="engine_no" class="form-control form_params">
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">品牌</label>
									<div class="col-lg-8 col-sm-7">
										<select name="brand_code"  ng-model="ch_brand" class="form-control form_params">
											<option></option>
											<option  ng-repeat="b in brands"  value="{{b.brand_code}}">{{b.brand_name}}</option>
										</select>
									</div>
								</div>
							</div>

							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">车系</label>
									<div class="col-lg-8 col-sm-7">
										<select name="series_code" id="series_code" ng-model="$root.ch_serie" class="form-control form_params">
											<option></option>
											<option  ng-repeat="b in series" value="{{b.series_code}}">{{b.series_name}}</option>
										</select>
									</div>
								</div>
							</div>

							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">车型</label>
									<div class="col-lg-8 col-sm-7">
										<select name="model_code" id="model_code" class="form-control form_params">
											<option></option>
											<option  ng-repeat="b in $parent.models" value="{{b.model_code}}">{{b.model_name}}</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">工单状态</label>
									<div class="col-lg-8 col-sm-7">
										<select name="order_status"  class="form-control form_params">
											<option></option>
											<option ng-repeat="b in ro_status" value="{{b.status_desc}}">{{b.status_desc}}</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="sold_by">服务专员</label>
									<div class="col-lg-8 col-sm-7">
										<input type="text" name="service_advisor_name" id="service_advisor_name" class="form-control select_edit form_params" value=""/>
                                        <ul class="select_list">
                                              <li ng-repeat="b in servicer" val_code="{{b.employee_no}}" val_name="{{b.employee_name}}">{{b.employee_name}}</li>
                                        </ul>  
									</div>
								</div>
							</div>
							
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="sold_by">维修技师</label>
									<div class="col-lg-8 col-sm-7">
										<input type="text" name="service_technician_name" id="service_technician_name" class="form-control select_edit form_params" value=""/>
                                        <ul class="select_list">
                                              <li ng-repeat="b in mechanic" val_code="{{b.employee_no}}" val_name="{{b.employee_name}}">{{b.employee_name}}</li>
                                        </ul>  
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">付款方式</label>
									<div class="col-lg-8 col-sm-7">
										<select name="pay_type_name"  class="form-control form_params">
											<option></option>
											<option ng-repeat="b in pay_type" value="{{b.pay_type_name}}">{{b.pay_type_name}}</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">是否关单</label>
									<div class="col-lg-8 col-sm-7">
										<select name="balance_close"  class="form-control form_params">
											<option></option>
											<option ng-repeat="b in is_colse" value="{{b.status_code}}">{{b.status_desc}}</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">是否回访</label>
									<div class="col-lg-8 col-sm-7">
										<select name="is_trace"  class="form-control form_params">
											<option></option>
											<option ng-repeat="b in is_back" value="{{b.status_code}}">{{b.status_desc}}</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">工单类型</label>
									<div class="col-lg-8 col-sm-7">
										<select name="order_type"  class="form-control form_params">
											<option></option>
											<option ng-repeat="b in ro_type" value="{{b.status_desc}}">{{b.status_desc}}</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="sold_by">车主编号</label>
									<div class="col-lg-8 col-sm-7">
										<select id="owner_no" name="owner_no"  class="js-data-example-ajax form-control form_params ">
											 <option value="" selected="selected"></option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">建档日期</label>
									<div class="col-lg-8 col-sm-7">
										<div data-date-format="yyyy-mm-dd" data-date="2016-5-15" class="input-large custom-date-range ">
											<input type="text" name="found_date1" class="form-control form_params" id="found_date1" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'found_date2\')||\'2020-10-01\'}'})">
										</div>
									</div>
								</div>
							</div>
                            
                            <div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label text-center" for="inputEmail1">至</label>
									<div class="col-lg-8 col-sm-7">
										<div data-date-format="yyyy-mm-dd" data-date="2016-5-15" class="input-large custom-date-range">
											 <input type="text" name="found_date2" class="form-control form_params" id="found_date2" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'found_date1\')}',maxDate:'2020-10-01'})">
										</div>
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">折扣部门</label>
									<div class="col-lg-8 col-sm-7">
										<select name="discount_dept"  class="form-control form_params">
											<option></option>
											<option value="销售">销售</option>
											<option value="售后">售后</option>
											<option value="其他">其他</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">是否竣工</label>
									<div class="col-lg-8 col-sm-7">
										<select name="complete_tag" class="form-control form_params">
											<option></option>
											<option ng-repeat="b in is_complete" value="{{b.status_code}}">{{b.status_desc}}</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">VIN</label>
									<div class="col-lg-8 col-sm-7">
										<input name="vin" type="text" class="form-control form_params">
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">折扣类型</label>
									<div class="col-lg-8 col-sm-7">
										<select name="discount_type"  class="form-control form_params">
											<option></option>
											<option ng-repeat="b in discount_type" value="{{b.status_desc}}">{{b.status_desc}}</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">优惠类型</label>
									<div class="col-lg-8 col-sm-7">
										<select name="audit_type"  class="form-control form_params">
											<option></option>
											<option value="折扣">OA整单折扣</option>
											<option value="免单">OA整单免单</option>
											<option value="店内折扣">店内折扣</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										for="inputEmail1">是否召回</label>
									<div class="col-lg-8 col-sm-7">
										<select name="is_recall" class="form-control form_params">
											<option></option>
											<option ng-repeat="b in is_recall" value="{{b.status_code}}">{{b.status_desc}}</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label long_title" for="inputEmail1">事故责任<br>类型</label>
									<div class="col-lg-8 col-sm-7">
										<select name="accident_resp_type" class="form-control form_params">
											<option></option>
											<option ng-repeat="b in accident_resp_type" value="{{b.status_desc}}">{{b.status_desc}}</option>
										</select>
									</div>
								</div>
							</div>
							
							<div class="col-md-3 ">
								<div class="form-group">
									<label class="col-lg-4 col-sm-5 control-label"
										   for="inputEmail1">是否直赔</label>
									<div class="col-lg-8 col-sm-7">
										<select name="is_direct_compensation" class="form-control form_params">
											<option></option>
											<option ng-repeat="b in is_direct_compensation" value="{{b.status_code}}">{{b.status_desc}}</option>
										</select>
									</div>
								</div>
							</div>
							
						</div>
					</div>
				</section>

				<section class="panel">
					<!--区块头 显示表格名称和功能按钮-->
					<header class="panel-heading">
						维修业务成本报表
						<headshow></headshow>
						<div class="option_check_list" style="display: inline-block;"></div>
                        <span style="font-size:12px; margin-left:30px;"><b>备注：</b><span style="background-color:#FCF8E3">米黄色为逾期交车</span></span>
						<!--控制按钮-->
						<span class="tools pull-right"> <!--收起--> <a
                                href="javascript:" class="fa fa-chevron-down"></a>
						</span>
						<div class="pull-right" style="margin-right: 10px; margin-top: -6px; display: inline-block">
							<button type="button" class="btn btn-danger btn-sm " href="#paramsSelect"
								data-toggle="modal">
								<i class="fa fa-plus"></i> 在结果集中筛选
							</button>
							<button type="button" class="btn btn-success btn-sm"
								id="search_table" ng-click="SearchData();">
								<i class="fa fa-search"></i> 查询表格
							</button>
						</div>
					</header>
					<!--区块body 显示表格内容-->
					<div class="panel-body form-horizontal ">

						<div class="adv-table" style="overflow-x: scroll">
							<table id="costTable"
								class="table table-striped  nowrap  dataTable no-footer table_store table-hover float_head"
								cellspacing="0" width="100%">
								<thead>
									<tr>
										<th ng-show="!cols.contains('index')" column="index">序号</th>
										<th ng-show="!cols.contains('entity_code')" column="entity_code">店面编号</th>
										<th ng-show="!cols.contains('entity_name')" column="entity_name">店面名称</th>
										<th ng-show="!cols.contains('entity_brand_name')" column="entity_brand_name">店面品牌</th>
										<th ng-show="!cols.contains('group_name')" column="group_name">事业部</th>
										<th ng-show="!cols.contains('ro_no')" column="ro_no">工单号</th>
										<th qtype='date' ng-show="!cols.contains('ro_create_date')" column="ro_create_date">开单日期</th>
										<th ng-show="!cols.contains('order_type')" column="order_type">工单类型</th>
										<th ng-show="!cols.contains('order_status')" column="order_status">工单状态</th>
										<th ng-show="!cols.contains('repair_type_name')" column="repair_type_name">维修类型</th>
										<th qtype='bool' ng-show="!cols.contains('is_rework')" column="is_rework">是否返修</th>
										<th qtype='bool' ng-show="!cols.contains('add_tag')" column="add_tag">二次增项</th>
										<th ng-show="!cols.contains('pay_type_name')" column="pay_type_name">付款方式</th>
										<th qtype='date' ng-show="!cols.contains('for_balance_time')" column="for_balance_time">提交结算时间</th>
										<th qtype='date' ng-show="!cols.contains('balance_time')" column="balance_time">结算时间</th>
										<th ng-show="!cols.contains('balance_no')" column="balance_no">结算单号</th>
										<th qtype='date' ng-show="!cols.contains('square_date')" column="square_date">结清日期</th>
										<th qtype='bool' ng-show="!cols.contains('balance_close')" column="balance_close">是否关单</th>
										<th qtype='date' ng-show="!cols.contains('balance_close_time')" column="balance_close_time">关单日期</th>
										<th ng-show="!cols.contains('commission')" column="commission">委托书号</th>
										<th qtype='float' ng-show="!cols.contains('paint_metal_amount')" column="paint_metal_amount">油漆板件数量</th>
										<th qtype='double' ng-show="!cols.contains('labour_amount')" column="labour_amount">工时费</th>
										<th qtype='double' ng-show="!cols.contains('labour_cost')" column="labour_cost">工时成本金额</th>
										<th qtype='double' ng-show="!cols.contains('repair_part_amount')" column="repair_part_amount">维修材料费</th>
										<th qtype='double' ng-show="!cols.contains('part_cost')" column="part_cost">维修材料成本</th>
										<th qtype='double' ng-show="!cols.contains('add_item_amount')" column="add_item_amount">附加项目费</th>
										<th qtype='double' ng-show="!cols.contains('order_profit')" column="order_profit">工单毛利</th>
										<th qtype='double' ng-show="!cols.contains('sub_obb_amount')" column="sub_obb_amount">去零金额</th>
										<th qtype='double' ng-show="!cols.contains('repair_amount')" column="repair_amount">维修金额</th>
										<th qtype='double' ng-show="!cols.contains('estimate_amount')" column="estimate_amount">预估金额</th>
										<th qtype='double' ng-show="!cols.contains('receive_amount')" column="receive_amount">结算金额</th>
										<th qtype='double' ng-show="!cols.contains('receivable_amount')" column="receivable_amount">应收金额</th>
										<th qtype='double' ng-show="!cols.contains('received_amount')" column="received_amount">已收金额</th>
										<th qtype='double' ng-show="!cols.contains('gross_profit')" column="gross_profit">毛利</th>
										<th qtype='double' ng-show="!cols.contains('gross_profit_margin')" column="gross_profit_margin">毛利率</th>
										<th qtype='double' ng-show="!cols.contains('add_part_profit')" column="add_part_profit">二次增项配件毛利</th>
										<th qtype='double' ng-show="!cols.contains('add_labour_amount')" column="add_labour_amount">二次增项工时收入</th>
										<th qtype='double' ng-show="!cols.contains('ds_amount')" column="ds_amount">定损金额</th>
										<th ng-show="!cols.contains('license')" column="license">车牌号</th>
										<th ng-show="!cols.contains('vin')" column="vin">VIN</th>
										<th ng-show="!cols.contains('engine_no')" column="engine_no">发动机号</th>
										<th ng-show="!cols.contains('brand_name')" column="brand_name">品牌</th>
										<th ng-show="!cols.contains('series_name')" column="series_name">车系</th>
										<th ng-show="!cols.contains('model_name')" column="model_name">车型</th>
										<th ng-show="!cols.contains('service_advisor_name')" column="service_advisor_name">服务专员</th>
										<th ng-show="!cols.contains('service_technician_name')" column="service_technician_name">维修技师</th>
										<th ng-show="!cols.contains('in_mileage')" column="in_mileage">进厂行驶里程</th>
										<th ng-show="!cols.contains('owner_no')" column="owner_no">车主编号</th>
										<th ng-show="!cols.contains('owner_name')" column="owner_name">车主</th>
										<th ng-show="!cols.contains('deliverer')" column="deliverer">送修人姓名</th>
										<th ng-show="!cols.contains('deliverer_sex')" column="deliverer_sex">送修人性别</th>
										<th ng-show="!cols.contains('deliverer_phone')" column="deliverer_phone">送修人电话</th>
										<th ng-show="!cols.contains('deliverer_mobile')" column="deliverer_mobile">送修人手机</th>
										<th ng-show="!cols.contains('complete_user')" column="complete_user">完工验收人</th>
										<th qtype='bool' ng-show="!cols.contains('complete_tag')" column="complete_tag">竣工标识</th>
										<th qtype='date' ng-show="!cols.contains('complete_time')" column="complete_time">竣工时间</th>
										<th qtype='date' ng-show="!cols.contains('end_time_supposed')" column="end_time_supposed">预交车时间</th>
										<th qtype='date' ng-show="!cols.contains('delivery_date')" column="delivery_date">交车日期</th>
										<th qtype='date' ng-show="!cols.contains('found_date')" column="found_date">建档日期</th>
										<th ng-show="!cols.contains('insuration_name')" column="insuration_name">赔付保险公司名称</th>
										<th ng-show="!cols.contains('accident_source')" column="accident_source">事故来源渠道</th>
										<th ng-show="!cols.contains('remark')" column="remark">备注</th>
										<th qtype='bool' ng-show="!cols.contains('is_use_coupon')" column="is_use_coupon">是否使用优惠券</th>
										<th qtype='double' ng-show="!cols.contains('deduct_amount')" column="deduct_amount">优惠券优惠金额</th>
										<th ng-show="!cols.contains('audit_type')" column="audit_type">优惠类型</th>
										<th ng-show="!cols.contains('discount_dept')" column="discount_dept">折扣部门</th>
										<th ng-show="!cols.contains('discount_type')" column="discount_type">折扣类型</th>
										<th qtype='bool' ng-show="!cols.contains('is_trace')" column="is_trace">是否回访</th>
										<th qtype='bool' ng-show="!cols.contains('is_recall')" column="is_recall">是否召回</th>
										<th ng-show="!cols.contains('accident_resp_type')" column="accident_resp_type">事故责任类型</th>
										<th qtype='bool' ng-show="!cols.contains('is_direct_compensation')" column="is_direct_compensation">是否直赔</th>
										<th qtype='bool' ng-show="!cols.contains('is_package')" column="is_package">是否组合套餐</th>
										<th ng-show="!cols.contains('package_code')" column="package_code">组合套餐编码</th>
									</tr>
								</thead>
								<tbody>
									<tr ng-repeat="c in costReports" ng-style="setColor(c.isover)">
										<td ng-show="!cols.contains('index')" class="">{{$index + 1 }}</td>
										<td ng-show="!cols.contains('entity_code')" class="">{{c.entity_code}}</td>
										<td ng-show="!cols.contains('entity_name')" class="">{{c.entity_name}}</td>
										<td ng-show="!cols.contains('entity_brand_name')" class="">{{c.entity_brand_name}}</td>
										<td ng-show="!cols.contains('group_name')" class="">{{c.group_name}}</td>
										<td ng-show="!cols.contains('ro_no')" class="">{{c.ro_no}}</td>
										<td ng-show="!cols.contains('ro_create_date')" class="">{{c.ro_create_date | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
										<td ng-show="!cols.contains('order_type')" class="">{{c.order_type}}</td>
										<td ng-show="!cols.contains('order_status')" class="">{{c.order_status}}</td>
										<td ng-show="!cols.contains('repair_type_name')" class="">{{c.repair_type_name}}</td>
										<td ng-show="!cols.contains('is_rework')" class="">{{c.is_rework == null?"":(c.is_rework=='12781001'?'是':'否')}}</td>
										<td ng-show="!cols.contains('add_tag')" class="">{{c.add_tag == null?"":(c.add_tag=='12781001'?'是':'否')}}</td>
										<td ng-show="!cols.contains('pay_type_name')" class="">{{c.pay_type_name}}</td>
										<td ng-show="!cols.contains('for_balance_time')" class="">{{c.for_balance_time | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
										<td ng-show="!cols.contains('balance_time')" class="">{{c.balance_time | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
										<td ng-show="!cols.contains('balance_no')" class="">{{c.balance_no}}</td>
										<td ng-show="!cols.contains('square_date')" class="">{{c.square_date | date : 'yyyy-MM-dd'}}</td>
										<td ng-show="!cols.contains('balance_close')" class="">{{c.balance_close=='12781001'?'是':'否'}}</td>
										<td ng-show="!cols.contains('balance_close_time')" class="">{{c.balance_close_time| date : 'yyyy-MM-dd HH:mm:ss'}}</td>
										<td ng-show="!cols.contains('commission')" class="">{{c.commission}}</td>
										<td ng-show="!cols.contains('paint_metal_amount')" class="">{{c.paint_metal_amount | number:2}}</td>
										<td ng-show="!cols.contains('labour_amount')" class="">{{c.labour_amount | number:2}}</td>
										<td ng-show="!cols.contains('labour_cost')" class="">{{c.labour_cost | number:2}}</td>
										<td ng-show="!cols.contains('repair_part_amount')" class="">{{c.repair_part_amount | number:2}}</td>
										<td ng-show="!cols.contains('part_cost')" class="">{{c.part_cost | number:2}}</td>
										<td ng-show="!cols.contains('add_item_amount')" class="">{{c.add_item_amount | number:2}}</td>
										<td ng-show="!cols.contains('order_profit')" class="">{{c.order_profit | number:2}}</td>
										<td ng-show="!cols.contains('sub_obb_amount')" class="">{{c.sub_obb_amount | number:2}}</td>
										<td ng-show="!cols.contains('repair_amount')" class="">{{c.repair_amount | number:2}}</td>
										<td ng-show="!cols.contains('estimate_amount')" class="">{{c.estimate_amount | number:2}}</td>
										<td ng-show="!cols.contains('receive_amount')" class="">{{c.receive_amount | number:2}}</td>
										<td ng-show="!cols.contains('receivable_amount')" class="">{{c.receivable_amount | number:2}}</td>
										<td ng-show="!cols.contains('received_amount')" class="">{{c.received_amount | number:2}}</td>
										<td ng-show="!cols.contains('gross_profit')" class="">{{c.gross_profit | number:2}}</td>
										<td ng-show="!cols.contains('gross_profit_margin')" class="">{{c.gross_profit_margin | number:2}}</td>
										<td ng-show="!cols.contains('add_part_profit')" class="">{{c.add_part_profit | number:2}}</td>
										<td ng-show="!cols.contains('add_labour_amount')" class="">{{c.add_labour_amount | number:2}}</td>
										<td ng-show="!cols.contains('ds_amount')" class="">{{c.ds_amount | number:2}}</td>
										<td ng-show="!cols.contains('license')" class="">{{c.license}}</td>
										<td ng-show="!cols.contains('vin')" class="">{{c.vin}}</td>
										<td ng-show="!cols.contains('engine_no')" class="">{{c.engine_no}}</td>
										<td ng-show="!cols.contains('brand_name')" class="">{{c.brand_name}}</td>
										<td ng-show="!cols.contains('series_name')" class="">{{c.series_name}}</td>
										<td ng-show="!cols.contains('model_name')" class="">{{c.model_name}}</td>
										<td ng-show="!cols.contains('service_advisor_name')" class="">{{c.service_advisor_name}}</td>
										<td ng-show="!cols.contains('service_technician_name')" class="">{{c.service_technician_name}}</td>
										<td ng-show="!cols.contains('in_mileage')" class="">{{c.in_mileage | number:2}}</td>
										<td ng-show="!cols.contains('owner_no')" class="">{{c.owner_no}}</td>
										<td ng-show="!cols.contains('owner_name')" class="">{{c.owner_name}}</td>
										<td ng-show="!cols.contains('deliverer')" class="">{{c.deliverer}}</td>
										<td ng-show="!cols.contains('deliverer_sex')" class="">{{c.deliverer_sex}}</td>
										<td ng-show="!cols.contains('deliverer_phone')" class="">{{c.deliverer_phone | mobile}}</td>
										<td ng-show="!cols.contains('deliverer_mobile')" class="">{{c.deliverer_mobile | mobile}}</td>
										<td ng-show="!cols.contains('complete_user')" class="">{{c.complete_user}}</td>
										<td ng-show="!cols.contains('complete_tag')" class="">{{c.complete_tag=='12781001'?'是':'否'}}</td>
										<td ng-show="!cols.contains('complete_time')" class="">{{c.complete_time | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
										<td ng-show="!cols.contains('end_time_supposed')" class="">{{c.end_time_supposed | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
										<td ng-show="!cols.contains('delivery_date')" class="">{{c.delivery_date | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
										<td ng-show="!cols.contains('found_date')" class="">{{c.found_date | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
										<td ng-show="!cols.contains('insuration_name')" class="">{{c.insuration_name}}</td>
										<td ng-show="!cols.contains('accident_source')" class="">{{c.accident_source}}</td>
										<td ng-show="!cols.contains('remark')" class="">{{c.remark}}</td>
										<td ng-show="!cols.contains('is_use_coupon')" class="{{c.is_use_coupon}}">{{c.is_use_coupon=='12781001'?'是':'否'}}</td>
										<td ng-show="!cols.contains('deduct_amount')" class="">{{c.deduct_amount | number:2}}</td>
										<td ng-show="!cols.contains('audit_type')" class="">{{c.audit_type}}</td>
										<td ng-show="!cols.contains('discount_dept')" class="">{{c.discount_dept}}</td>
										<td ng-show="!cols.contains('discount_type')" class="">{{c.discount_type}}</td>
										<td ng-show="!cols.contains('is_trace')" class="">{{c.is_trace=='12781001'?'是':'否'}}</td>
										<td ng-show="!cols.contains('is_recall')" class="">{{c.is_recall=='12781001'?'是':'否'}}</td>
										<td ng-show="!cols.contains('accident_resp_type')" class="">{{c.accident_resp_type}}</td>
										<td ng-show="!cols.contains('is_direct_compensation')" class="left">{{c.is_direct_compensation=='12781001'?'是':'否'}}</td>
										<td ng-show="!cols.contains('is_package')" class="left">{{c.is_package}}</td>
										<td ng-show="!cols.contains('package_code')" class="left">{{c.package_code}}</td>
									</tr>


									<tr class="tbody_last_tr" ng-show="pagination.totalItems > 0">
										<td ng-show="!cols.contains('index')" class=""></td>
										<td ng-show="!cols.contains('entity_code')" class=""></td>
										<td ng-show="!cols.contains('entity_name')" class=""></td>
										<td ng-show="!cols.contains('group_brand_name')" class=""></td>
										<td ng-show="!cols.contains('group_name')" class=""></td>
										<td ng-show="!cols.contains('ro_no')" class=""></td>
										<td ng-show="!cols.contains('ro_create_date')" class=""></td>
										<td ng-show="!cols.contains('order_type')" class=""></td>
										<td ng-show="!cols.contains('order_status')" class=""></td>
										<td ng-show="!cols.contains('repair_type_name')" class=""></td>
										<td ng-show="!cols.contains('is_rework')" class=""></td>
										<td ng-show="!cols.contains('add_tag')" class=""></td>
										<td ng-show="!cols.contains('pay_type_name')" class=""></td>
										<td ng-show="!cols.contains('for_balance_time')" class=""></td>
										<td ng-show="!cols.contains('balance_time')" class=""></td>
										<td ng-show="!cols.contains('balance_no')" class=""></td>
										<td ng-show="!cols.contains('square_date')" class=""></td>
										<td ng-show="!cols.contains('balance_close')" class=""></td>
										<td ng-show="!cols.contains('balance_close_time')" class=""></td>
										<td ng-show="!cols.contains('commission')" class=""></td>
										<td ng-show="!cols.contains('paint_metal_amount')" class="">{{costSum.sum_paint_metal_amount.value | number:2}}</td>
										<td ng-show="!cols.contains('labour_amount')" class="">{{costSum.sum_labour_amount.value  | number:2}}</td>
										<td ng-show="!cols.contains('labour_cost')" class=""></td>
										<td ng-show="!cols.contains('repair_part_amount')" class="">{{costSum.sum_repair_part_amount.value  | number:2}}</td>
										<td ng-show="!cols.contains('part_cost')" class="">{{costSum.sum_part_cost.value  | number:2}}</td>
										<td ng-show="!cols.contains('add_item_amount')" class="">{{costSum.sum_add_item_amount.value  | number:2}}</td>
										<td ng-show="!cols.contains('order_profit')" class="">{{costSum.sum_order_profit.value  | number:2}}</td>
										<td ng-show="!cols.contains('sub_obb_amount')" class="">{{costSum.sum_sub_obb_amount.value  | number:2}}</td>
										<td ng-show="!cols.contains('repair_amount')" class="">{{costSum.sum_repair_amount.value  | number:2}}</td>
										<td ng-show="!cols.contains('estimate_amount')" class="">{{costSum.sum_estimate_amount.value  | number:2}}</td>
										<td ng-show="!cols.contains('receive_amount')" class="">{{costSum.sum_receive_amount.value  | number:2}}</td>
										<td ng-show="!cols.contains('receivable_amount')" class="">{{costSum.sum_receivable_amount.value  | number:2}}</td>
										<td ng-show="!cols.contains('received_amount')" class="">{{costSum.sum_received_amount.value  | number:2}}</td>
										<td ng-show="!cols.contains('gross_profit')" class="">{{costSum.sum_gross_profit.value  | number:2}}</td>
										<td ng-show="!cols.contains('gross_profit_margin')" class="">{{costSum.sum_received_amount.value==0?0:(costSum.sum_gross_profit.value/(costSum.sum_received_amount.value/1.17))  | number:2}}</td>
										<td ng-show="!cols.contains('add_part_profit')" class="">{{costSum.sum_add_part_profit.value  | number:2}}</td>
										<td ng-show="!cols.contains('add_labour_amount')" class="">{{costSum.sum_add_labour_amount.value  | number:2}}</td>
										<td ng-show="!cols.contains('ds_mount')" class="">{{costSum.sum_ds_amount.value  | number:2}}</td>
										<td ng-show="!cols.contains('license')" class=""></td>
										<td ng-show="!cols.contains('vin')" class=""></td>
										<td ng-show="!cols.contains('engine_no')" class=""></td>
										<td ng-show="!cols.contains('brand_name')" class=""></td>
										<td ng-show="!cols.contains('series_name')" class=""></td>
										<td ng-show="!cols.contains('model_name')" class=""></td>
										<td ng-show="!cols.contains('service_advisor_name')" class="left"></td>
										<td ng-show="!cols.contains('service_technician_name')" class="left"></td>
										<td ng-show="!cols.contains('in_mileage')" class=""></td>
										<td ng-show="!cols.contains('owner_no')" class=""></td>
										<td ng-show="!cols.contains('owner_name')" class=""></td>
										<td ng-show="!cols.contains('deliverer')" class=""></td>
										<td ng-show="!cols.contains('deliverer_sex')" class=""></td>
										<td ng-show="!cols.contains('deliverer_phone')" class=""></td>
										<td ng-show="!cols.contains('deliverer_mobile')" class=""></td>
										<td ng-show="!cols.contains('complete_user')" class=""></td>
										<td ng-show="!cols.contains('complete_tag')" class=""></td>
										<td ng-show="!cols.contains('complete_time')" class=""></td>
										<td ng-show="!cols.contains('end_time_supposed')" class=""></td>
										<td ng-show="!cols.contains('delivery_date')" class=""></td>
										<td ng-show="!cols.contains('found_date')" class=""></td>
										<td ng-show="!cols.contains('insuration_name')" class=""></td>
										<td ng-show="!cols.contains('accident_source')" class=""></td>
										<td ng-show="!cols.contains('remark')" class=""></td>
										<td ng-show="!cols.contains('is_use_coupon')" class=""></td>
										<td ng-show="!cols.contains('deduct_amount')" class=""></td>
										<td ng-show="!cols.contains('audit_type')" class=""></td>
										<td ng-show="!cols.contains('discount_dept')" class=""></td>
										<td ng-show="!cols.contains('discount_type')" class=""></td>
										<td ng-show="!cols.contains('is_trace')" class=""></td>
										<td ng-show="!cols.contains('is_recall')" class=""></td>
										<td ng-show="!cols.contains('accident_resp_type')" class=""></td>
										<td ng-show="!cols.contains('is_direct_compensation')" class="left"></td>
										<td ng-show="!cols.contains('is_package')" class="left"></td>
										<td ng-show="!cols.contains('package_code')" class="left"></td>
									</tr>
								</tbody>
							</table>
							<div class="no-items" ng-show="pagination.totalItems <= 0">暂无数据</div>
						</div>
						<tm-pagination conf="pagination"></tm-pagination>
					</div>
 				</section>
				<!--表格显示区域-->

			</div>
		</div>
	</div>
</div>

<form id="export_form" action="cost/export"  method="post">
	<input type="hidden" name="keys" id="keys" />
	<input type="hidden" name="names" id="names" /> 
	<input type="hidden" name="params" id="params" />
	<input type="hidden" name="search_opt" id="search_opt" /> 
	<input type="hidden" name="file_name" id="file_name" value="维修业务成本查询"/>
</form>



